package cn.nai.DemoRan.demo05;

public class E_Test {
    public static void main(String[] args) {
        //老师的工资
        Teacher teacher = new Teacher("老师1号",1000,3000.3);
        double annual1 = teacher.annual();
        String teacherName = teacher.getName();
        System.out.println("老师->" + teacherName + "的工资是" + annual1);
        Scientist scientist = new Scientist("科学家1号",2000,20000);//科学家的
        double annual2 = scientist.annual();
        String scientistName = scientist.getName();
        System.out.println("科学家->" + scientistName + "的工资是" + annual2);
    }
}
